
package com.swak.frame.dto.base;

/**
 * ClassName: SysRestCode.java 
 * @Description: 系统级别retCode
 * @author colley.ma
 * @date 2021年3月15日
 */
public enum SysRestCode implements RestApiCode {
	
    SUCC(200, "请求成功~", "请求成功"),
	
	USER_NO_LOGIN(1101, "您未登录，请先登录~", "用户未登陆"), 
	USER_NO_BIND_PHONE(1102, "您未绑定手机号，请先绑定手机号！", "用户未绑定手机号"),
	USER_LOGIN_AUTH_CHECK(1103, "无权限访问，请联系管理员申请对应资源权限！","无权限"),
	USER_RISK(1104, "哎呀，活动太火爆啦,换个宝贝试试吧~", "风控用户"),
	USER_PHOME_ACCOUNT(1105,"同一个手机号已有账户参与互动","同一个手机号已有账户参与互动"),
	
	SYS_ERR(900, "活动太火爆啦，换个宝贝试试吧~", "系统异常"), 
    SYS_RPC_TIMEOUT(901, "活动太火爆啦，换个宝贝试试吧~", "接口调用超时"), 
    SYS_RPC_RETRY_ERR(902, "活动太火爆啦，换个宝贝试试吧~", "限流或其他原因需重试"), 
    //限流code
    SYS_REQ_LIMIT(903, "活动异常火爆，已优先为您接入快速通道，稍等片刻~", "服务被限流"),
    SYS_INVALID_SPI(904,"ApiValidate注解未配置,请检查！","ApiValidate未配置"),
	
	INVALID_PARAM(910, "请求失败，请求参数错误", "参数校验失败"), 
    INVALID_DATA(912, "数据异常，稍后再试吧~", "数据异常~"), 
    INVALID_WHITE_LIST(913,"白名单校验失败，您不在白名单中~","白名单校验失败"),
    INVALID_CHANNEL(914,"非法渠道，请确保渠道token是否正确！","非法渠道"),
    
    OPER_REPEAT_LIMIT(920, "你点击的太快啦,稍后再试~", "不能重复操作~"), 
    OPER_NO_ALLOW(921, "活动太火爆啦，换个宝贝试试吧!", "其它设置不允许操作"), 
    OPER_UPPER_LIMIT(923, "你点击的太快啦,稍后再试~", "操作达到上限控制"), 
    
    
    ACTIVITY_START(930,"活动未开始，敬请期待~","活动未开始"),
    ACTIVITY_END(931, "活动已结束，试试其他活动吧~", "活动不存在或已结束");
    
    
	
	
    private Integer retCode;
    private String retMessage;
    private String retDesc;

    SysRestCode(Integer retCode, String retMessage, String retDesc) {
        this.retCode = retCode;
        this.retMessage = retMessage;
        this.retDesc = retDesc;
    }

    @Override
    public String getRetCode() {
        return String.valueOf(this.retCode);
    }
    
    @Override
    public String getRetMessage() {
        return this.retMessage;
    }

    @Override
    public String getRetDesc() {
        return this.retDesc;
    }

    public static void main(String[] args) {
        for(RestApiCode rest:SysRestCode.values()) {
            String name = rest.getResource();
            System.out.println(name);
        }
    }

}
